import request from "@/utils/request";

const DEPT_BASE_URL = "/sms/3rd";

export function addApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/admin/add`,
    method: "post",
    data: data,
  });
}

export function getListApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/admin/list`,
    method: "post",
    data: data,
  });
}

export function previewApi(data) {
  return request({
    url: `${DEPT_BASE_URL}/admin/preview`,
    method: "post",
    data: data,
  });
}

export function adminPreview(data) {
  return request({
    url: `/sms/3rd/preview`,
    method: "post",
    data: data,
  });
}

export function getRuleList(data) {
  return request({
    url: `/sms/user/rule/get`,
    method: "post",
    data: data,
  });
}

export function setRuleList(data) {
  return request({
    url: `/sms/user/rule/set`,
    method: "post",
    data: data,
  });
}

export function deleteRuleList(data) {
  return request({
    url: `/sms/user/rule/delete`,
    method: "post",
    data: data,
  });
}

export function queryBalance(data) {
  return request({
    url: `/sms/3rd/refreshBalance`,
    method: "post",
    data: data,
  });
}

export function smsValids(data) {
  return request({
    url: `/sms/3rd/valids`,
    method: "post",
    data: data,
  });
}
export function configList(data) {
  return request({
    url: `/sms/3rd/config/list`,
    method: "post",
    data: data,
  });
}

export function addConfig(data) {
  return request({
    url: `/sms/3rd/config/add`,
    method: "post",
    data: data,
  });
}

export function editConfig(data) {
  return request({
    url: `/sms/3rd/config/edit`,
    method: "post",
    data: data,
  });
}

export function delConfig(data) {
  return request({
    url: `/sms/3rd/config/del`,
    method: "post",
    data: data,
  });
}

export function delIds(data) {
  return request({
    url: `/sms/3rd/admin/del`,
    method: "post",
    data: data,
  });
}

export function getFormOptions(data) {
  return request({
    url: `/sms/3rd/custom`,
    method: "post",
    data: data,
  });
}

export function smsTest(type, data) {
  return request({
    url: `/sms/test/${type}`,
    method: "post",
    data: data,
  });
}
export function setCurrentApi(data) {
  return request({
    url: `/sms/user/set`,
    method: "post",
    data: data,
  });
}
export function getSmsResult(data) {
  return request({
    url: `/sms/result`,
    method: "post",
    data: data,
  });
}
export function statusSwitch(data) {
  return request({
    url: `/sms/3rd/admin/switch`,
    method: "post",
    data: data,
  });
}
export function configSwitch(data) {
  return request({
    url: `/sms/3rd/config/switch`,
    method: "post",
    data: data,
  });
}
